package Thread.Sleep;

/*
 *   public static void sleep(long millis)使当前线程暂停millis时间
 * 单位为毫秒
 *
 * */
public class Sleep {
    public static void main(String[] args) {
        for (int i = 0; i < 20; i++) {
            System.out.println(i);

            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
